﻿Public Class cMediosPago
    Private drMedioPago As dsBancos.GLO_MEDIOSPAGORow
    Public Sub New(ByVal IdMedio As String)
        Try
            Dim daMediosP As New dsBancosTableAdapters.GLO_MEDIOSPAGOTableAdapter
            Dim dtMP As dsBancos.GLO_MEDIOSPAGODataTable = daMediosP.GetDataByIdMedioPago(IdMedio)
            If dtMP.Rows.Count > 0 Then
                drMedioPago = dtMP.Rows(0)
            Else
                Throw New Exception("Medio de pago no existe, favor verificar")
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public ReadOnly Property IdMedio() As String
        Get
            Return drMedioPago.IDMEDIOPAGO
        End Get
    End Property
    Public ReadOnly Property DescripcionMedio() As String
        Get
            Return drMedioPago.DESCRIPCION
        End Get
    End Property
End Class
